home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / console-common.postinst < prev    next >
Encoding:
Text File  |  2009-11-08  |  1.6 KB  |  60 lines

  1. #!/bin/sh 
  2.  
  3. set -e
  4.  
  5.  
  6. # Ensure old keymap-loading scripts previously provided by
  7. # console-tools and kbd are gone for good, or the keymap loaded
  8. # by console-common may be overriden by an obsolete one.
  9.  
  10. # We need to do this because init.d scripts have to be conffiles, and
  11. # we hit dpkg Bug#59740.  Additionally the "update-rc.d remove"
  12. # cleanup has to be done anyway.
  13.  
  14. # the kbd one
  15. if [ -r /etc/init.d/keymaps.sh ]
  16. then
  17.     rm -f /etc/init.d/keymaps.sh
  18.     update-rc.d keymaps.sh remove >/dev/null
  19. fi
  20.  
  21. # the lct one
  22. if [ -r /etc/init.d/keymaps-lct.sh ]
  23. then
  24.     rm -f /etc/init.d/keymaps-lct.sh
  25.     update-rc.d keymaps-lct.sh remove >/dev/null
  26. fi
  27.  
  28. # Automatically added by dh_consoledata
  29. if [ "$1" = "configure" ]
  30. then
  31.   # Do nothing if console-common is not installed.
  32.   if [ -x /usr/share/console/getkmapchoice.pl ] 
  33.   then 
  34.       . /usr/share/debconf/confmodule
  35.       # If the entry contains a / it's broken so overwrite it with a default
  36.       # value.  See see #110873
  37.       if db_get console-data/keymap/full && echo "$RET" | grep -q "/"; then
  38.           db_set console-data/keymap/full us
  39.       fi
  40.       echo >&2 "Looking for keymap to install:"
  41.       if /usr/share/console/getkmapchoice.pl
  42.       then
  43.       install-keymap `PERL_BADLANG=0 \
  44.        /usr/share/console/getkmapchoice.pl 2>&1 | tail -n 1`
  45.       fi
  46.   fi
  47. fi
  48. # End automatically added section
  49. # Automatically added by dh_installinit
  50. if [ -x "/etc/init.d/keymap.sh" ]; then
  51.     update-rc.d keymap.sh start 05 S . >/dev/null
  52.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  53.         invoke-rc.d keymap.sh start || exit $?
  54.     else
  55.         /etc/init.d/keymap.sh start || exit $?
  56.     fi
  57. fi
  58. # End automatically added section
  59.  
  60.